debug while and if then