refactoring to improve context load - DRY