add swipe and some fixes old solution, some refactor js file