looks like 'static_cast' is not needed here