renamed onUpdate to update
made update an interface function