add some database code