removed unnecessary array duplications