updated code with integration to other groups code