completing swift sample