changed C casts to C++ casts