separated gems in groups