wrote emitClick handler