implemented a queue