added overloaded update function