update kdb(not finished)