implementing queues and stacks 7950441