before queue implementation