function composed for set margin behavior and integrated