removed old comments.  Made repetitve text input grabbing into a function