button clicks and dynamic update of text fields