added reset function to allow reset the time
starting separating template in h and cpp for vector