Added lost sales function