add registerreceiver & broadcast function