added Timer function.