implemented flick detector