use queue properly