simplified code and made event methods chainable