modfications to reduce code
JSON post