to db after each state expansion