added zero randomness and keyboard input