updated utils.R with normalize() instead of norm()