add netwrokState and readyState listener