proper refreshing of mainAcitivity