using template for kbase variables