Updating code for rect.values and radio/checkbox code