refactoring in package structure for serialization