removed uneccessary casting to double