refactor constant loading