Ex5 Internal timer code done, external timer remains to be done.