Update MainLogic.java

Changed main logic