suburi generator refactoring with test cases