replce library loading to external source