fixed measurement issue in main