add tests and example