add function to set timer