template for solver