refactor package and class structure