pass keys to group order function