not using cycle in steque and swap