refactored for clearer package view