swift rewrite
update to add licence
Merge branch 'swift'