add matrix, random graph generator