Completed testing
Modified code loop