added timer to run periodic functions, still testing