added swipe code from google