skeleton code handling POST, and json