refactor template to use a base template, srp, kiss,