correct copy array B elemnts into A