change tabs to spaces
add baseclass metamagic to event functions