better initialization of lib