adjusted to use hash, example code counts on different columns