this works properly, but is at the mercy of the scheduler (intended for this project)