fixes #1 support C and D properly