add gene algorithm