external script replaced by events

Change-Id: Ic3a3aa42b3b5e33b738d3ca36db4a266274830fd