refactored variable fm to fragmentManager