changes to textTo to match API