began reimplementing event handler