optimize code ex4.1-create-an-input-hint