added examples and minor enhancements