made a separate global data init func