add constructor to TaskClass and change toString to getTime