Added delay function, timer interupt changed to work in the units of 8