turned validPoints a matrix