merge both ffmap scripts into one with multigraph approach