refactored splitting