Added 2 more working demos

fixed bug generating random number (added method for this in Mat)