flattern out the packages