replaced Thread.sleep at the end of each main method with System.in.read