added map output function