add a ticker() function and a usage example