updated intermediate swift