do calculations based on input in a text field