added select group for condition