removed set and array counting