refactored package structure to achieve better modularization