getGroupIndex implemented, need to test