What does an einer Erfindung tüfteln mean?

an einer Erfindung tüfteln - German to English

to refine an invention