name file stuff
better rands, functions cleanups