Implemented checks for overlapping visits