refactor a bit, add namespace to yaml