queue implementation with stack