partial implementation of legend table