change gen table code completely