updating util function for ter mplan