changed datastructure

matches rev 9:
https://gist.github.com/StilgarBF/c21826994b775787f739/55bf9b5dc4dee94c0144b47e9068cdc491a62a47