add content and refactor swift