updated api
added some examples.
fixed default config