remove unnecessary codes and change void to async task