same as js structure