replace use of checkin and checkout with transaction