fixed template, added some utilities and boilerplate