completed code for rinse cycle