added functionality to enter_code() method, and it worked with a code