add observation loss script