overlap and gap functions should be documented