added animatedirection option + refined the swipe functions