rename mapping function and fix build issue