Added preempt and edited it a little.