restructured into lib/ and example/