Modified map command slightly to optionally include input.