add test coverage
add checking for JSON parse error