add access logic for schedule.yml
clean and replace definitions
wrote comments
quickfixed unused importing