move normalize() method up