adjusted with refactored structure