move buttonText into preview function