optimized and clead up adding to queue