temp implementation of static_path_find().