reorganizing the manual matching