rename build_generated function