implements a queue using two stacks