templates, works with eigen vectorXd; enum Model