moved templated to header