changed update to take arguments.