start refactoring to substruct