update threshhold
fix merge
remove commented code and switch to runtime.h func