fixed checktable function

this function was taking time during update so fixed it. and few terms
are also changed.