added examples and clean up