refactor ctructura