swiping sideways algorithm finished