added event-system for scripting