refactor checkin code
refactor checkin code