Added text api
fix bug