wip: refactoring feature creation in legends