refactored package structure