update test.
rewrite to use array of pointers.
fix duplicate package output.