alternative implementation using Table and other classes.