checkin functionality (NOT DONE)