use a callback for library load