chamge milliseconds in microseconds (increasing time resolution), also changing somt ints to longs, and added comments