added margin for legend