updated controller and view to add user name and age
moved logic to model