added comments to schedule code