fixed brokenness, added swipe function