modify logic to support firebase checkin