added end & beginText for internal use