Remove while loop