added examples, improved module interfaces