validation & swiping