using lists as  queues