trying to fix the bug in group