use the template to implement the ready queue

still needs to be monitorized. comments to other stuff.