fixed problems...
todo: know where to stop the while loop