The present invention relates to methods of creating genetic diversity. The invention also relates to methods of making nucleic acid libraries and their uses to screen for biological activities. The invention can be used to create, improve or modify nucleic acid sequences or repertoire, particularly from non-cultivable microorganisms and finds various applications in the medical, food, agriculture or veterinary industries, for instance. The invention particularly uses and discloses in situ gene shuffling.