modified component rotation logic