new json api code compiles. need to test now.