Added a loss class.