Improved the efficency of the queue by adding a tail element to the linked list