templated all methods and classes