move function outside the library