Added all code from Genetic Basisc