clean up and make the queue states work