One key question in evolutionary biology is how novel genes arise and develop. Researchers now show how new genes and functions that are advantageous to bacteria can be selected from random DNA sequences.