adding Swift support, needs testing