updated Methods.java