trying to templatize