added insert interval solution