add port event handler