changed return type for dequeue
updated