Got async while loop to work