why you have cy>2 and cy<0?also what does swap do and the variables after that