support for a callback function when cycling