solve swift syntax change