normal and normalize functions