an example of extending Javascript queues by Stephen Morley