more work dijekstra (not working yet)