improved light calculation