improve example and documentation