trying to fix old code fo new D versions