basic functionality working for legend