replaced button and moving data formatting to separate file