renamed dequeue to api/dequeue