state stored in dict type structure communication both ways as JSON