refactor loading yaml content