Solved if else in Main