new feature for error functions: now they can make use of the raw data a well!