Edited normalizer function to normalize by row and columns