moving items into packages by type -> function
correcting a typo