remove now unnecessary const_cast