implementado o splitting algorithm