refactored types