backend for cell formatting