Trying genetic algorithm approach