added split legend support