djikstras works, need to clean up code a ton though