change method name to onSend