complete some function
db merge