add checkin and get checkin function