Rewrote box text function