add database api & bugfixes
Merge branch 'confirm'