updated test code that appeared in the paper