use emit instead of broadcast