implemented own event handler