added threshold and data changes