Adding min-max engine