improving the yaml reader