changed from text to textbox
wrapped to avoid null pointer exception