refactor structure