add map functionality to submit handler