genetic algo, before test