generates library model