refactored internal data to more interlinked