added better custom legend handling