cleaned up input.java