cleaned up the interface. extended the interface and examples.