Added support for duration
Added overlap detection