small update and corrected cycle