learning 'rand' command, sometimes gives 0, dunno why