Added generate_phi and mrg_loc to IS directory