use $emit with $broadcast