implemented threshold on maxmium mutations attempts