randomisation improved, and fixed a memory issue.