added checkins function