some funcs to enc mod added