replaced arrays by lists