use traverse helper
Add helper method for traversing yaml file