fixed var error and renamed json array