Exercise 4-2: oninput handler and assign control value