added handlejson sleep