more advanced key-gen
hide table, use pcase
added data table