completed code example