Extracted map Data response into separate function