minor changes; 
fixed while loop not compiling b/c the way LLVM handles control flow.