set duration in 'notify' function