Added example and more tests