refactor structure
changed output