tic function.