removed unnecessary casts