#4 implemented Input.java