Corrected do function.