Changed emit to accept a single data parameter