improve double tap logic