begin work on swift implementation