cast to size_t makes sense here
introduce noexcept to some methods