Add attributes to output if passed in map as first argument