Added support for swiping in and out