code for learning swift