moved some functions into library.