fix bugs in specifying own toy potential
added test