removed unnecessary code in download_library