swift: removed unnecessary variable