formatting and shading at the right time