library code extraced