Issue #2 The repeated elements of the qeue were eliminated in order to improve the performance