added hidden graph function and shuffling