rename rawErrorValue to errorValue and errorValue to gradient