intersectLights cP hitp norm w@World{items = o, lights = (l:ls)} shin= do
    res <- intersectLight cP hitp norm w l shin

    res2 <-intersectLights cP hitp norm (World{items = o , lights = ls}) shin
    let fres =(((fst res)+fst(res2)) /2.0,(cadd (snd res)(snd res2)))
    return $ fres


-- Calculates the shadowray for one specific light and returns the color of the 
-- light and the intensity
intersectLights cP hitp norm w@World{items = o, lights = (l:ls)} shin= do
    res <- intersectLight cP hitp norm w l shin

    res2 <-intersectLights cP hitp norm (World{items = o , lights = ls}) shin
    let fres =(((fst res)+fst(res2)) /2.0,(cadd (snd res)(snd res2)))
    return $ fres


-- Calculates the shadowray for one specific light and returns the color of the 
-- light and the intensity
intersectLights cP hitp norm w@World{items = o, lights = (l:ls)} shin= do
    res <- intersectLight cP hitp norm w l shin

    res2 <-intersectLights cP hitp norm (World{items = o , lights = ls}) shin
    let fres =(((fst res)+fst(res2)) /2.0,(cadd (snd res)(snd res2)))
    return $ fres


-- Calculates the shadowray for one specific light and returns the color of the 
-- light and the intensity