unneccessary casts removed