setup a more reasonable lib structure