tested up to selection, with result drawing

Next and last step, graph construction