fixed names with spaces infinite loop and implemented random stat draw