fixed while loop....MAXXXXXX