adding library code