clean up of code and assign to textfield type