added some funcitons and Timer ISR