change events and add unit tests