modified module to use cons, pins and mins tables