added swipe method to library