findDistLoads :: X.Element -> LoadDirection -> LoadVectors
findDistLoads el loadDir = result 
    where y' = XC.xmlAttr ys el 
          result = case y' of Nothing -> (y1, y2) 
                                where y1 = maybeLoad ys1 
                                      y2 = maybeLoad ys2 
                              Just v -> (y1,y1)
                                where y1 = read v
          maybeLoad v = maybe 0.0 (\p -> read p) $ XC.xmlAttr v el
          (ys,ys1,ys2) | loadDir == LDY = ("y","y1","y2")
                       | otherwise = ("x","x1","x2")
findDistLoads :: X.Element -> LoadDirection -> LoadVectors
findDistLoads el loadDir = result 
    where y' = XC.xmlAttr ys el 
          result = case y' of Nothing -> (y1, y2) 
                                where y1 = maybeLoad ys1 
                                      y2 = maybeLoad ys2 
                              Just v -> (y1,y1)
                                where y1 = read v
          maybeLoad v = maybe 0.0 (\p -> read p) $ XC.xmlAttr v el
          (ys,ys1,ys2) | loadDir == LDY = ("y","y1","y2")
                       | otherwise = ("x","x1","x2")
findDistLoads el loadDir = result 
    where y' = XC.xmlAttr ys el 
          result = case y' of Nothing -> (y1, y2) 
                                where y1 = maybeLoad ys1 
                                      y2 = maybeLoad ys2 
                              Just v -> (y1,y1)
                                where y1 = read v
          maybeLoad v = maybe 0.0 (\p -> read p) $ XC.xmlAttr v el
          (ys,ys1,ys2) | loadDir == LDY = ("y","y1","y2")
                       | otherwise = ("x","x1","x2")