fix main to parse and serve