works with Data and MC

Added switch for Data, did massive cleanup of brackets.