add in script checkbof-function