updated register.java