add a class to handle text input