function: static_cast instead of reinterpret_cast