add checks for size_t