added matrix(), raffle(), bkp() and keycheck() functions