A nucleic acid molecule encoding a polypeptide having the activity of a beta-galactosidase (EC 3.2.1.23) which beta-galactosidase is characterized in that it has (i) sufficient enzymatic activity in the range 5 to 50°C to catalyze the hydrolysis of ß-galactosidases into monosaccharides, (ii) sufficient enzymatic activity at a pH range from 6 to 8 to catalyze the hydrolysis of ß-galactosidases into monosaccharides, and (iii) an enzymatic activity that is not inhibited by reaction products such as galactose, or other products substantially present in milk, such as calcium, which beta-galactosidase is encoded by (a) a nucleic acid molecule encoding a polypeptide comprising or consisting of the amino acid sequence of SEQ ID NO: 1; (b) a nucleic acid molecule comprising or consisting of the nucleotide sequence of SEQ ID NO: 2; (c) a nucleic acid molecule encoding a beta-galactosidase the amino acid sequence of which is at least 70% identical to the amino acid sequence of SEQ ID NO: 1; (d) a nucleic acid molecule comprising or consisting of a nucleotide sequence which is at least 70% identical to the nucleotide sequence of SEQ ID NO: 2; or (e) a nucleic acid molecule corresponding to the nucleic acid molecule of any one of (a) to (d) wherein T is replaced by U; a fragment of the polypeptide of having the activity of a beta-galactosidase as defined in and comprising at least 800 amino acids. a polypeptide having the activity of a beta-galactosidase (EC 3.2.1.23) which beta-galactosidase is characterized in that it has (i) sufficient enzymatic activity in the range 5 to 50°C to catalyze the hydrolysis of ß-galactosidases into monosaccharides, (ii) sufficient enzymatic activity at a pH range from 6 to 8 to catalyze the hydrolysis of ß-galactosidases into monosaccharides, and (iii) an enzymatic activity that is not inhibited by reaction products such as galactose, or other products substantially present in milk, such as calcium, which beta-galactosidase is encoded by (a) a nucleic acid molecule encoding a polypeptide comprising or consisting of the amino acid sequence of SEQ ID NO: 1; (b) a nucleic acid molecule comprising or consisting of the nucleotide sequence of SEQ ID NO: 2; (c) a nucleic acid molecule encoding a beta-galactosidase the amino acid sequence of which is at least 70% identical to the amino acid sequence of SEQ ID NO: 1; (d) a nucleic acid molecule comprising or consisting of a nucleotide sequence which is at least 70% identical to the nucleotide sequence of SEQ ID NO: 2; or (e) a nucleic acid molecule corresponding to the nucleic acid molecule of any one of (a) to (d) wherein T is replaced by U; (a) a nucleic acid molecule encoding a polypeptide comprising or consisting of the amino acid sequence of SEQ ID NO: 1; (b) a nucleic acid molecule comprising or consisting of the nucleotide sequence of SEQ ID NO: 2; (c) a nucleic acid molecule encoding a beta-galactosidase the amino acid sequence of which is at least 70% identical to the amino acid sequence of SEQ ID NO: 1; (d) a nucleic acid molecule comprising or consisting of a nucleotide sequence which is at least 70% identical to the nucleotide sequence of SEQ ID NO: 2; or (e) a nucleic acid molecule corresponding to the nucleic acid molecule of any one of (a) to (d) wherein T is replaced by U; a fragment of the polypeptide of having the activity of a beta-galactosidase as defined in and comprising at least 800 amino acids.