added gettimeofday to time formJ and solve