Changed callback function

Now it is possible to apply a callback function on only one element.