add ability to pass JSON on init