added JSON object creation for servlet response