modified __main__ to calculate all the data