added threshold to movement detection in tap event