add 2 loss functions (ULS, GLS), update tests