Renamed groups to use 0 indexing