new libary loader with event handler