added serial event handler