update code to adjust new swift future