thresholds: wip
thresholds: added the client side logic
merge