improved H()

added the coefficient D to the Manhattan function