cleanup and add timer