Use goto instead of while
Use Local variable is preferred