grenetic algorithm refactoring & maintanence