add comments, rename functions, clear timer