test shortcut and other warnings added
tested corner case of d=r