eliminate unnecessary const_cast