checkin function cleanup
delegate cleanup