Updated solver to include solution at final time