cleaned up base templated