modified module to use pins, mins and cons tables