fixed it for real (n^2)