use compiled lib and add event