refact packages struct