extracted find mapping function