starting text parse function