the advanced normalize function now runs after I realized that  (float*) convert 2D arrays into 1D arrays. However testing it in visual studio it clearly doesn't do what it's supposed to.