added possibility to parametrize the template param