added a stack based on queues, for homework 3