added lookup table for daylengths
merged changes from lugosi