formatting code for best view