refactor the src of MainFragment