tune generation for bulk models
added lockTables and unlockTables