added json package supporting setstate