finish queue implementation with #pop