minor changes + JSON support