created check_input method and new_contact method