added weights to edges on ArrayGraph