avoids const_cast