fixed duplicated 'for'