added edge array generation