updated client to automatically call refresh