finally got json working