Updated LDoms code