Added onUpdate and enabled swipe