solution to circular list and image roatation done