fix examples, add testthat