changed update to be generic