modified and added test for the updated event emit