more refactoring in CustomLocFrag