templating working but locals not