further improvement on OTP.java