changed edge weights to be float instead of integer