added swiping functionality