optimal code, and removing some unneded casts. Submitted by: dim Approved by: kwm, miwi (mentors, implicit)