add cost event implementation example