add swift type casting