removed some uneccessary type casting