ref #81 changed id type from int to size_t