modified main function to be compatible with new version of get_all_paths