refactored package setup