Added a shading function