added correct swiping logic