Added common generic method for update/increment/decrement