removed swap(), implemented pop for everything