fixed case when everything winds up under one group
fixed support for multiple keys