Since most of this code is the same as instancetest, can we just add this method there?