making emit return a boolean