Turn macro into function to see what goes on, enable collect stat