implemented internal timer