Add new feature to handle user defined event.