removed async task and split up onhandleintent function