removed log
added events mechanism