Improvement in new box function and add dynamic library