moved all weight calculation methods into FragmentWeight class