refactored to have a base package