made a library
removed functions to the library