add support for specifying margin