trying to fix the ready queue and the infinite loop