add library code