cleaned up scheduling