changed size_t's to integers