deriving encodable/decodable for dijkstra