refactored a constructor
rectified a bug
Time is incremented in the task second by second