basic rendering of hbs template
refactored to promises and tidied up code