create loss objects