First attempt on scheduling, kind of works...but broken