added tableToGroup utility