updated files to find optimal mapping function