refactored helper classes