add reduce methods + tests, move all D test cases to their own class