updated function to use a custom saccade detector