refactoring the tests to use mustache templates