div to ul for legends