Adding an AsyncTask to execute the algortithm.