Final version of the mapper