Added timer for if statement