Converted to AsyncTask