add library and template