improve quickstart example and add tests