All the code is written in `main` func. Break the code into different functions
All the code is written in
mainfunc. Break the code into different functions