used three varaiables for all function used in json