why a solution vector has to be passed here?