added swiping functionality to change tabs