Using preSolve and postSolve