Added a mapper function to core.