changes so we can reuse the same mechinism for yaml and hash