attempt to add normalize function to matrix