change addr database from array based to dict based