changing hashref to two arrayref to represent data