ties refactored