implement api to display string