attempt at templating