working test of integer weighted graphs, stable commit before generalising weights and weighted methods using templates