build package struct