removed unneeded casts