add function to regenerate DB key