Added genetic optimization code