moves mapping to function