create hash and two dimensional array