use c template as starting point