added logic to create method in groups controller