swift adaptation (1)