refactored fragments and activities