Swift example code