check for correctly formed packages