added second threshold measuring