modifications to way library is loaded. almost works again