the one problem is that it never exits the loop if it doesnt hit anything, so you may want to change that.