queue implementation based on linked lists