added test files, checks for cyclic, singleroot