streamlined template and test code