templated sub control