dob bugfix and refactoring the method of input