replace array's with hashes