Changed to use emits not just message