new implementation of the potfit code