add duration and fix double event