wip, json serialization doesnt seem to work properly - ask about this on forum