fix randomize
cleanup