Mapping function has been implemented but not tested.