move database method into claim server and add closing logic