fixed randomise function call
minor fixes