Added text input functions