mucking around with some templating/functional stuff