Added formal testing function for updateG