BUG: library load in wrong place / WIP: reworking flow of code