api mostly functional, begin templating