improving tests and updating example