Added loss condition