updated image.c and light.cpp