updated Working textbox logic