added static_cast for casting