finished up rotation group code