added spacial case 2 for split
minor refactorings