Refactor to using n_of_a_kind