re-write Thread to AsyncTask