make size of table compact
add proper size_t->unsigned cast