now reads data directly from yaml file