switched from size_t to unsigned
more functions
more functions