added directive with swipe functionality