added threshold optimization