cleaned up template impls