add scheme.json and fix main.cpp