made a better library creation script