added update query generator