changed builder class and generate method