added check for null swipes