group and join logic update
group values before returning
fix issue with hardcoded id param