Added logic for the rotation flag.  Works with test arguments.