Added queue with minimum query