added recording code and fixed text field bugs

added recording code and fixed text field bugs