did template instantiation with full code duplication. yay!