removed unneccessary typecasts