Renaming test class
Loop detection functions