Fully implemented preemtive edf

The errors were solved but the overall working has not been tested.
One of the functions is also not implemented