Swift: working updateMarkedSource()