update of schedule generating algorithm... very basic