implemented a queue using the list data structure