use std::size_t to avoid conversion warnings