add state and global config & database