Replace library
Refactor Code