if this wasn't custom report code i'd say you should pull out the double emit into a function, but whatever