implemented swiping