Ouput residual data and use better marking scheme