added support of class-methods for handling events