code reformatting on client side