also add casts to function arguments