added legend to hist-errors