pluging system refactored
simple event system implemented