updated textbox functions