fusion of LXR code from rudeog and pld