this version generate final result and add lib