State setup now returns a promise