Fixed coinflip 

Fixed coinflip to work with long data type output of random()