refactor package structure