replace for-of by for-in