fix various bugs and use touchnswipe