added JSON options support