made some improvements to the library