add groups functionality

https://www.pivotaltracker.com/story/show/63473398