add an example to wiki
improve api