improved example and documentation