Added iteration conditions

confused on how to update I