fixed non-valid json, added method