max entropy function created from scripts