added db calls used by checkin checkout