finished swift api mapping