uses c-style casts instead of c++ ones