use instance of lib for putLibrary instead of cls