using templates and input box updating model