using promises to sequence state updates for hospital state and fixed bug with deleting a hospital using hospital state