using int instead of size_t. probably deals with #104