Added function to swap storages