adding templating so we don't need ajax requests