update testing function