deleted unused code on onResume lifecycle method