refactored update method, generalized and moved to DBWrapper Client