Added swiping to the code