added swift code sample for reference