created a class for yaml reader