added collinear check