add matchedbom function