Made the separation alg work