Arther-Modified the code to shared Library