Added function to call update query