implemented a stack with one queue