script for removing groups