changed hashmap to JSONObject