implemented group, unique, count and utility functions