contract Fortune {
  string[] public fortunes; // automatically generates an indexed getter (only)

  function Fortune( string initialFortune ) public {
    addFortune( initialFortune );
  }

  function addFortune( string fortune ) public {
    fortunes.push( fortune );

    FortuneAdded( msg.sender, fortune );
  }

  function drawFortune() public view returns ( string fortune ) {
    fortune = fortunes[ shittyRandom() % fortunes.length ];
  }

  function countFortunes() public view returns ( uint count ) {
    count = fortunes.length;	   
  }

  function shittyRandom() private view returns ( uint number ) {
    number = uint( block.blockhash( block.number - 1 ) );  	   
  }

  event FortuneAdded( address author, string fortune );	
}
function Fortune( string initialFortune ) public {
    addFortune( initialFortune );
  }
// automatically generates an indexed getter (only)