refactored package for ex 1a